﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Manul.Genetics.Genom
{
    public class Gen : GenomItem
    {
        public Gen()
        {
            DominantLevel = 0;
            Code = "0";
        }

        public string Code
        { get; set; }

        public int DominantLevel
        { get; set; }

        [XmlIgnore]
        public static GenNull Null
        {
            get
            {
                return GenNull.GetInstance();
            }
        }

        public override Gen FindGen(string code)
        {
            return (this.Code == code) ? this : null;
        }

        public override void Swap(int index1, int index2)
        {
        }

        public override bool IsInList(int index)
        {
            return false;
        }
    }
}
